<body>
<?php include 'header.phtml';?>

</div><div class="AppContent GridView"><div id="ProjectBreadCrumbView" class="BreadCrumbView"><div class="breadcrumbs">
<a href="/demos/stable/app/index.php/projects/default/dashboardDetails">Projects</a> &#47; <span>Projects</span></div></div><div id="ActionBarSearchAndListView" class="GridView"><div id="SecuredActionBarForProjectsSearchAndListView" class="SecuredActionBarForSearchAndListView ActionBarForSearchAndListView ActionBarConfigurableMetadataView ConfigurableMetadataView MetadataView"><div class="view-toolbar-container clearfix"><nav class="pillbox clearfix"><div id="ProjectsDashboardMenuActionElement--yt1" class="default-button">
<a class="button-action" href="/demos/stable/app/index.php/projects/default/dashboardDetails"><i class="icon-project-dashboard"></i><span class="button-label">Dashboard</span></a></div><div class="active split-button" id="ProjectsListMenuActionElement--yt2">
<a class="button-action" href="/demos/stable/app/index.php/projects/default/list"><i class="icon-projects-list"></i><span class="button-label">Projects</span></a><a class="button-trigger"><i class="icon-trigger"></i></a><ul class="button-actions"><li><a href="/zz/public/project/add">Create Project</a></li></ul></div><div id="MassEditMenuActionElement--yt3" class="default-button">
<a class="button-action-trigger"><i class="icon-edit"></i><span class="button-label">Update</span><i class="icon-trigger"></i></a><ul class="button-actions"><li id="list-view-massActionSelected"><a href="#">Selected</a></li><li id="list-view-massActionAll"><a href="#">All Results</a></li></ul></div><div id="ExportMenuActionElement--yt4" class="default-button">
<a class="button-action-trigger"><i class="icon-export"></i><span class="button-label">Export</span><i class="icon-trigger"></i></a><ul class="button-actions"><li id="list-view-exportActionSelected"><a href="#">Selected</a></li><li id="list-view-exportActionAll"><a href="#">All Results</a></li></ul></div></nav></div></div><div id="ProjectsSearchView" class="SavedDynamicSearchView DynamicSearchView SearchView ModelView ConfigurableMetadataView MetadataView"><div class="wide form"><form id="search-form" action="/demos/stable/app/index.php/zurmo/default/validateDynamicSearch?viewClassName=ProjectsSearchView&amp;modelClassName=Project&amp;formModelClassName=ProjectsSearchForm" method="post">
<div style="display:none"><input type="hidden" value="3cbccf3c8e50be81be905c3e58f6e0fceba79ced" name="YII_CSRF_TOKEN" /></div><div id="list-view-summary-clone" class="list-view-items-summary-clone"></div><div class="search-view-0" ><table><tr><th></th><td colspan="3"><select class="ignore-style ignore-clearform" id="ProjectsSearchForm_anyMixedAttributesScope" multiple="multiple" style="display:none;" size="4" name="ProjectsSearchForm[anyMixedAttributesScope][]">
<option value="All" selected="selected">All</option>
<option value="name">Name</option>
</select><input class="input-hint anyMixedAttributes-input" onfocus="$(this).select();" size="80" id="ProjectsSearchForm_anyMixedAttributes" name="ProjectsSearchForm[anyMixedAttributes]" type="text" /><div class="errorMessage" id="ProjectsSearchForm_anyMixedAttributes_em_" style="display:none"></div></td></tr></table></div><div class="search-view-1" style='display:none;'><div class="hasDropDown"><span class="select-arrow"></span><select id="savedSearchId" name="savedSearchId">
<option value="">Load a saved search</option>
</select></div><div id="search-form_es_" class="errorSummary" style="display:none"><p>Please fix the following input errors:</p>
<ul><li>dummy</li></ul></div><div style="display:none;"><input id="ProjectsSearchForm_dynamicClausesNotUsed" name="dynamicClausesValidationHelper" value="notUsed" type="hidden" /><div id="ProjectsSearchForm_dynamicClauses" class="errorMessage" style="display:none"></div></div><div class="add-fields-container"><input id="rowCounter-search-form" type="hidden" value="0" name="rowCounter" /><a id="addExtraAdvancedSearchRowButton-search-form" href="#"><span class="z-spinner"></span><span class="z-icon"></span><span class="z-label">Add criteria</span></a></div><div class="search-save-container"><strong class="mp-divider"> &middot; </strong><a id="save-as-advanced-search" href="#">Save search</a></div><div id="save-search-area" class="view-toolbar-container clearfix" style="display:none;"><input name="ProjectsSearchForm[savedSearchName]" id="ProjectsSearchForm_savedSearchName" type="text" maxlength="64" /><input name="ProjectsSearchForm[savedSearchId]" id="ProjectsSearchForm_savedSearchId" type="hidden" /><input name="ProjectsSearchForm[sortAttribute]" id="ProjectsSearchForm_sortAttribute" type="hidden" /><input name="ProjectsSearchForm[sortDescending]" id="ProjectsSearchForm_sortDescending" type="hidden" /><a id="save-advanced-search" name="save" class="attachLoading z-button" value="saveSearch" onclick="js:$(this).addClass(&quot;attachLoadingTarget&quot;);jQuery.yii.submitForm(this, &#039;&#039;, {&#039;save&#039;:&#039;save&#039;}); return false;" href="#"><span class="z-spinner"></span><span class="z-icon"></span><span class="z-label">Save</span></a><div class="errorMessage" id="ProjectsSearchForm_savedSearchName_em_" style="display:none"></div></div><div id="show-dynamic-search-structure-wrapper-search-form" style="display:none;"><a id="show-dynamic-search-structure-div-link-search-form" style="" href="#">Modify Structure</a><div id="show-dynamic-search-structure-div-search-form" class="has-lang-label" style="display:none;"><input id="ProjectsSearchForm_dynamicStructure" name="ProjectsSearchForm[dynamicStructure]" class="dynamic-search-structure-input" type="text" /><span>Search Operator</span><div class="errorMessage" id="ProjectsSearchForm_dynamicStructure_em_" style="display:none"></div></div></div><div class="view-toolbar-container clearfix"><div class="form-toolbar"><a id="search-advanced-search" name="save" class="attachLoading z-button" onclick="js:$(this).addClass(&quot;attachLoadingTarget&quot;);jQuery.yii.submitForm(this, &#039;&#039;, {&#039;save&#039;:&#039;save&#039;}); return false;" href="#"><span class="z-spinner"></span><span class="z-icon"></span><span class="z-label">Search</span></a><a id="cancel-advanced-search" class="cancel-button" href="#"><span class="z-label">Close</span></a></div></div></div><div class="select-list-attributes-view" style="display:none"><div class="attributesContainer"><table><tbody><tr><td><div class="multiselect-holder"><div class="multiselect-left"><label>Hidden Columns</label><select size="10" multiple="multiple" class="ignore-style multiple" id="ProjectsSearchForm_selectedListAttributes_hidden" name="ProjectsSearchForm[selectedListAttributes]_hidden[]">
<option value="createdByUser">Created By User</option>
<option value="createdDateTime">Created Date Time</option>
<option value="description">Description</option>
<option value="id">Id</option>
<option value="modifiedByUser">Modified By User</option>
<option value="modifiedDateTime">Modified Date Time</option>
<option value="status">Status</option>
</select></div><div class="multiselect-nav">input id="yw2moveRight" class="white-button icon-right-arrow" name="yt7" type="button" value="7" /><input id="yw2moveLeft" class="white-button icon-left-arrow" name="yt8" type="button" value="8" /></div><div class="multiselect-right"><label>Visible Columns</label><select size="10" multiple="multiple" class="ignore-style multiple" id="ProjectsSearchForm_selectedListAttributes" name="ProjectsSearchForm[selectedListAttributes][]">
<option value="name">Name</option>
<option value="owner">Owner</option>
</select></div><div class="multiselect-nav multiselect-nav-updown"><input id="yw2moveUp" class="white-button icon-up-arrow" name="yt9" type="button" value="5" /><input id="yw2moveDown" class="white-button icon-down-arrow" name="yt10" type="button" value="6" /></div></div></td></tr></tbody></table></div><div class="view-toolbar-container"><div class="form-toolbar clearfix"><a id="list-attributes-reset" name="save" class="default-btn z-button" onclick="js:$(this).addClass(&quot;attachLoadingTarget&quot;);$(&#039;.select-list-attributes-view&#039;).hide();
                    resetSelectedListAttributes(&#039;ProjectsSearchForm_selectedListAttributes&#039;, &#039;ProjectsSearchForm_selectedListAttributes_hidden&#039;, [&quot;name&quot;,&quot;owner&quot;]);
                   jQuery.yii.submitForm(this, &#039;&#039;, {&#039;save&#039;:&#039;save&#039;}); return false;" href="#"><span class="z-spinner"></span><span class="z-icon"></span><span class="z-label">Reset</span></a><a id="list-attributes-apply" name="save" class="attachLoading z-button" onclick="js:$(this).addClass(&quot;attachLoadingTarget&quot;);jQuery.yii.submitForm(this, &#039;&#039;, {&#039;save&#039;:&#039;save&#039;}); return false;" href="#"><span class="z-spinner"></span><span class="z-icon"></span><span class="z-label">Apply</span></a></div></div></div><div class="search-form-tools"><a id="more-search-link" href="#">Advanced</a><a id="select-list-attributes-link" href="#">Columns</a><a id="clear-search-link" style="display:none;" href="#"><span class="clear-search-link-criteria-selected-count"></span>Criteria Selected <span class="icon-clear">Z</span></a><input id="clearingSearch-search-form" type="hidden" name="clearingSearch" /></div></form><div id="modalContainer-search-form"></div></div></div><div id="ProjectsListView" class="SecuredListView ListView ModelView ConfigurableMetadataView MetadataView"><div class="cgrid-view type-projects" id="list-view">
<div class="summary">30 result(s)</div><div class="items-wrapper"><table class="items">
<thead>
<tr>
<th class="checkbox-column" id="list-view-rowSelector"><label class="hasCheckBox"><input type="checkbox" value="1" name="list-view-rowSelector_all" id="list-view-rowSelector_all" /></label></th><th id="list-view_c1"><a class="sort-link" href="/demos/stable/app/index.php/projects/default/list?Project_sort=name">Name</a></th><th id="list-view_c2"><a class="sort-link" href="/demos/stable/app/index.php/projects/default/list?Project_sort=owner">Owner</a></th><th class="button-column" id="list-view_c3">&#160;</th><th class="button-column" id="list-view_c3">&#160;</th></tr>
</thead>
<tbody>
<?php foreach ($projectviews as $projectview) : ?>
<tr>
<td class="checkbox-column"><label class="hasCheckBox"><input value="1" id="list-view-rowSelector_0" type="checkbox" name="list-view-rowSelector[]" /></label></td>
    <td><?php echo $this->escapeHtml($projectview->name);?></td>
    <td><?php echo $this->escapeHtml($projectview->Owner);?></td>
    <td>
      <a href="<?php echo $this->url('project',
            array('action'=>'edit', 'id' => $projectview->id));?>">Edit</a>
        <a href="<?php echo $this->url('project',
            array('action'=>'delete', 'id' => $projectview->id));?>">Delete</a>
    </td>
    <td><a href="<?php echo $this->url('project',
            array('action'=>'addtask'));?>">Create Task</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table></div><div class="pager vertical"><ul id="yw3" class="endless-list-pager"><li class="next"><a id="list-view-endless-page" class="vertical-forward-pager" href="#"><span>next</span></a></li></ul></div><div class="list-preloader"><span class="z-spinner"></span></div><div class="keys" style="display:none" title="/demos/stable/app/index.php/projects/default/list"><span>1</span><span>25</span><span>12</span><span>23</span><span>9</span><span>16</span><span>8</span><span>24</span><span>6</span><span>18</span></div>
</div>
<input type="hidden" value="" name="list-view-selectedIds" id="list-view-selectedIds" />
</div></div></div><div id="FlashMessageView"><div id = "FlashMessageBar"></div></div></div><div id="ModalContainerView"><div id="modalContainer"></div></div><div id="ModalGameNotificationContainerView"></div><div id="GameCoinContainerView"></div><div id="FooterView"><a href="http://www.zurmo.com" id="credit-link" class="clearfix"><span>Copyright &#169; Zurmo Inc., 2014. All rights reserved.</span></a><div class="ui-chooser"><a class="icon-mobile" href="/demos/stable/app/index.php/zurmo/default/userInterface?userInterface=Mobile"><span>Show Mobile</span></a><a class="icon-desktop active" href="/demos/stable/app/index.php/zurmo/default/userInterface?userInterface=Desktop"><span>Show Full</span></a></div></div></div></div></div><script type="text/javascript">
/*<![CDATA[*/
function closeGamificationDashboard(){
                               $('#UserGameDashboardView').remove();
                               $('body').removeClass('gd-dashboard-active');
                               $('#header-game-dashboard-link').html('∂').toggleClass('highlighted');
                           }

                function deleteSavedSearchAndRemoveFromView(modelId)
                {
                        $.ajax(
                            url : '/demos/stable/app/index.php/zurmo/default/deleteSavedSearch?id=' + modelId,
                            type : 'GET',
                            dataType : 'json',
                            success : function(data)
                            {
                               var inputId = 'savedSearchId';
                               $('#' + inputId + ' > option').each(function(){
                                   if (this.value == modelId)
                                   {
                                       $('#' + inputId + ' option[value=\'' + this.value + '\']').remove();
                                   }
                               });
                               $('#removeSavedSearch').remove();
                               $('#ProjectsSearchForm_savedSearchId').val('');
                            },
                            error : function()
                            {
                                //todo: error call
                            }
                        });
                }
            
jQuery(function($) {

                    jQuery("body").ajaxComplete(
                        function(event, request, options)
                        {
                            if (request.responseText == "sessionTimeout")
                            {
                                $.cookie("sessionTimeoutCookie", 1,
                                        {
                                            expires : 1,
                                            path:  "/"
                                        });
                                window.location.reload(true);
                            }
                        }
                    );
                
$('#claim-item-link').on('click', function(event){
                               event.preventDefault();
                               $(this).off('click');
                               var magicAudio = document.getElementById('collection-item-claimed');
                               magicAudio.play();
                               $('#game-notification').fadeOut(300);
                           });
$('#close-game-notification-link').click(function(event){
                               event.preventDefault();
                               $('#game-notification').fadeOut(300);
                           });
                           $('.gd-dashboard-active').on('click', function(){
                               if($('#UserGameDashboardView').length){
                                   closeGamificationDashboard();
                               }
                               return false;
                           });
$('body').on('click', '#header-game-dashboard-link', function(){jQuery.ajax({'beforeSend':function(){
                        if($("#UserGameDashboardView").length){
                            closeGamificationDashboard();
                            return false;
                        }
                        $("body").addClass("gd-dashboard-active");
                        $("#header-game-dashboard-link").html("‰").toggleClass("highlighted");
                    },'success':function(data){$("#FooterView").after(data);},'url':'/demos/stable/app/index.php/users/default/gameDashboard?id=1','cache':false});return false;});
  $(".nav li").hover(
    function () {
      if ($(this).hasClass("parent")) {
        $(this).addClass("over");
      }
    },
    function () {
      $(this).removeClass("over");
    }
  );

$("#globalSearchScope").bind("multiselectclick", function(event, ui){
                            if ($("#globalSearchScope").multiselect("widget").find(":checkbox:checked").length == 0)
                            {
                                $("#globalSearchScope").multiselect("widget").find(":checkbox").each(function(){
                                    if (this.value == "All" && !this.checked)
                                    {
                                        this.click();
                                    }
                                });
                            }
                            if (ui.value == "All" && ui.checked)
                            {
                                $("#globalSearchScope").multiselect("widget").find(":checkbox").each(function(){
                                    if (this.value != "All" && this.checked)
                                    {
                                        this.click();
                                    }
                                });
                            }
                            else if (ui.value != "All" && ui.checked)
                            {
                                $("#globalSearchScope").multiselect("widget").find(":checkbox").each(function(){
                                    if (this.value == "All" && this.checked)
                                    {
                                        this.click();
                                    }
                                });
                            }
                        });
                       
$('#globalSearchScope').multiselect({'selectedText':'','noneSelectedText':'','header':false,'position':{'my':'right top','at':'right bottom'}}); $(this).setupCheckboxStyling($('#globalSearchScope').parent())
$("#globalSearchInput").bind("focus", function(event, ui){
                            $("#globalSearchInput").autocomplete("option", "source", "/demos/stable/app/index.php/zurmo/default/globalSearchAutoComplete?" + $.param($("#globalSearchScope").serializeArray()));
                        });
                       
jQuery('#globalSearchInput').autocomplete({'select': function(event, ui) {if (ui.item.href.length > 0){window.location = ui.item.href;} return false;},'search': function(event, ui) { $(this).makeOrRemoveTogglableSpinner(true, "#app-search") },'open': function(event, ui) { $(this).makeOrRemoveTogglableSpinner(false, "#app-search") },'position':{'my':'right top','at':'right bottom'},'source':'/demos/stable/app/index.php/zurmo/default/globalSearchAutoComplete'});
 $("#globalSearchInput").data( "autocomplete" )._renderItem = function( ul, item ) {
                            return $( "<li></li>" ).data( "item.autocomplete", item )
                                    .append( "<a><span class=" + item.iconClass + "></span><span>" + item.label + "</span></a>" )
                                    .appendTo( ul );
                        };
$('body').on('click', '#yt0', function(){jQuery.ajax({'beforeSend':function(){
                jQuery('#modalContainer').html('');
                $(this).makeLargeLoadingSpinner(true, '#modalContainer');
                //window.scrollTo(0, 0);
                jQuery('#modalContainer').dialog({
                    'title' : 'Create Task',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : 'task-dialog',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#modalContainer').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#modalContainer').parent().removeClass('openingModal');
                                                     $('#modalContainer').dialog('destroy');
                                                     
                                                     }
                });
                return true;
            },'url':'/demos/stable/app/index.php/tasks/default/modalCreate?modalId=modalContainer','cache':false,'success':function(html){jQuery("#modalContainer").html(html)}});return false;});

                        function massActionMenuActionElementEventHandler(elementType, gridId, baseUrl, actionId,
                                pageVarName, minSelected, alertMessage)
                        {
                            selectAll = '';
                            if (elementType == 1)
                            {
                                var selectedIdsString = $('#' + gridId + '-selectedIds').val();
                                var numberSelected = selectedIdsString == '' ? 0 : selectedIdsString.split(',').length;
                                if (numberSelected < minSelected)
                                {
                                    alert(alertMessage);
                                    $(this).val('');
                                    return false;
                                }
                            }
                            else
                            {
                                selectAll = 1;
                            }
                            var options =
                            {
                                url     : $.fn.yiiGridView.getUrl(gridId),
                                baseUrl : baseUrl
                            }
                            if (options.url.split( '?' ).length == 2)
                            {
                                options.url = options.baseUrl + '/' + actionId + '?' + options.url.split( '?' )[1];
                            }
                            else
                            {
                                options.url = options.baseUrl + '/' + actionId;
                            }
                            if (elementType == 1)
                            {
                                addListViewSelectedIdsToUrl(gridId, options);
                            }
                            var data = '' + actionId + '=' + '&selectAll=' + selectAll + '&ajax=&' + pageVarName + '=1';
                            url = $.param.querystring(options.url, data);
                            url += '';
                            window.location.href = url;
                            return false;
                        }
                
$('#list-view-massActionAll').unbind('click.action').bind('click.action', function()
                                {
                                    massActionMenuActionElementEventHandler(0, 'list-view', '/demos/stable/app/index.php/projects/default', 'massEdit', 'Project_page', '1', 'At least 1 record must be selected')
                                }
                            );
$('#list-view-massActionSelected').unbind('click.action').bind('click.action', function()
                                {
                                    massActionMenuActionElementEventHandler(1, 'list-view', '/demos/stable/app/index.php/projects/default', 'massEdit', 'Project_page', '1', 'At least 1 record must be selected')
                                }
                            );
$('#list-view-exportActionAll').unbind('click.action').bind('click.action', function()
                                {
                                    massActionMenuActionElementEventHandler(0, 'list-view', '/demos/stable/app/index.php/projects/default', 'export', 'Project_page', '1', 'At least 1 record must be selected')
                                }
                            );
$('#list-view-exportActionSelected').unbind('click.action').bind('click.action', function()
                                {
                                    massActionMenuActionElementEventHandler(1, 'list-view', '/demos/stable/app/index.php/projects/default', 'export', 'Project_page', '1', 'At least 1 record must be selected')
                                }
                            );
$("#ProjectsSearchForm_anyMixedAttributesScope").bind("multiselectclick", function(event, ui){
                            if ($("#ProjectsSearchForm_anyMixedAttributesScope").multiselect("widget").find(":checkbox:checked").length == 0)
                            {
                                $("#ProjectsSearchForm_anyMixedAttributesScope").multiselect("widget").find(":checkbox").each(function(){
                                    if (this.value == "All" && !this.checked)
                                    {
                                        this.click();
                                    }
                                });
                            }
                            if (ui.value == "All" && ui.checked)
                            {
                                $("#ProjectsSearchForm_anyMixedAttributesScope").multiselect("widget").find(":checkbox").each(function(){
                                    if (this.value != "All" && this.checked)
                                    {
                                        this.click();
                                    }
                                });
                            }
                            else if (ui.value != "All" && ui.checked)
                            {
                                $("#ProjectsSearchForm_anyMixedAttributesScope").multiselect("widget").find(":checkbox").each(function(){
                                    if (this.value == "All" && this.checked)
                                    {
                                        this.click();
                                    }
                                });
                            }
                        });
                       
$('#ProjectsSearchForm_anyMixedAttributesScope').multiselect({'selectedText':'','noneSelectedText':'','header':false}); $(this).setupCheckboxStyling($('#ProjectsSearchForm_anyMixedAttributesScope').parent())
 basicSearchQueued = 0; basicSearchOldValue = '';   var basicSearchHandler = function(event)
                            {
                                if (basicSearchOldValue != $(this).val())
                                {
                                    basicSearchOldValue = $(this).val();
                                    basicSearchQueued = basicSearchQueued  + 1;
                                    setTimeout('basicSearchQueued = basicSearchQueued - 1', 900);
                                    setTimeout('$(this).searchByQueuedSearch("ProjectsSearchForm_anyMixedAttributes")', 1000);
                                }
                            };   $('#ProjectsSearchForm_anyMixedAttributes').unbind('input.ajax propertychange.ajax keyup.ajax');
                                $('#ProjectsSearchForm_anyMixedAttributes').bind('input.ajax propertychange.ajax keyup.ajax', basicSearchHandler);
                            

                $('#savedSearchId').unbind('change'); $('#savedSearchId').bind('change', function()
                {
                    if ($(this).val() != '')
                    {
                        savedSearchId = $(this).val();
                        $.ajax(
                        {
                          url: '/demos/stable/app/index.php/zurmo/default/clearStickySearch?key=ProjectsSearchView',
                          complete: function(data)
                          {
                              window.location = '/demos/stable/app/index.php/projects/default/list?savedSearchId=' + savedSearchId;
                          }
                        });
                    }
                });
$('body').off('click.add', '#addExtraAdvancedSearchRowButton-search-form'); $('body').on('click.add', '#addExtraAdvancedSearchRowButton-search-form', function(){jQuery.ajax({'type':'GET','data':'rowNumber=' + $('#rowCounter-search-form').val(),'beforeSend':function(){
                                            $(this).makeOrRemoveLoadingSpinner(true, "#search-form", "dark");
                                            },'success':function(data){
                                            $('#rowCounter-search-form').val(parseInt($('#rowCounter-search-form').val()) + 1)
                                            $('#addExtraAdvancedSearchRowButton-search-form').parent().before(data);
                                            rebuildDynamicSearchRowNumbersAndStructureInput("search-form");
                                            resolveClearLinkPrefixLabelAndVisibility("search-form");
                                            $(this).makeOrRemoveLoadingSpinner(false, "#search-form");
                                          },'url':'/demos/stable/app/index.php/zurmo/default/dynamicSearchAddExtraRow?viewClassName=ProjectsSearchView&modelClassName=Project&formModelClassName=ProjectsSearchForm&suffix=search-form','cache':false});return false;});

                $('#select-list-attributes-link').unbind('click.more');
                $('#select-list-attributes-link').bind('click.more',  function(event)
                    {
                        $(this).closest('form').find('.search-view-1').hide();
                        $(this).closest('form').find('.kanban-board-options-view').hide();
                        $('.select-list-attributes-view').toggle();
                        return false;
                    }
                );
                $('#list-attributes-reset').unbind('click.close');
                $('#list-attributes-reset').bind('click.close', function()
                    {
                        $('.select-list-attributes-view').hide();
                    }
                );
                $('#list-attributes-apply').unbind('click.close');
                $('#list-attributes-apply').bind('click.close', function()
                    {
                        $('.select-list-attributes-view').hide();
                    }
                );
                
$('#yw2moveRight').click(function()
                            {
                                return !$('#ProjectsSearchForm_selectedListAttributes_hidden option:selected')
                                .remove().appendTo('#ProjectsSearchForm_selectedListAttributes');
                            });
                            $('#yw2moveLeft').click(function()
                            {
                                return !$('#ProjectsSearchForm_selectedListAttributes option:selected')
                                .remove().appendTo('#ProjectsSearchForm_selectedListAttributes_hidden');
                            });$('#search-form').submit(function()
                            {
                                $('#ProjectsSearchForm_selectedListAttributes_hidden option').each(function(i)
                                {
                                    $(this).attr('selected', 'selected');
                                });
                            });$('#search-form').submit(function()
                            {
                                $('#ProjectsSearchForm_selectedListAttributes option').each(function(i)
                                {
                                    $(this).attr('selected', 'selected');
                                });
                            });$('#yw2moveUp').click(function()
                            {
                                if ($('#ProjectsSearchForm_selectedListAttributes option:selected').first().index() > 0)
                                {
                                    $('#ProjectsSearchForm_selectedListAttributes option:selected').each(function()
                                    {
                                       $(this).insertBefore($(this).prev());
                                    });
                                }
                            });
                            $('#yw2moveDown').click(function()
                            {
                                if ($('#ProjectsSearchForm_selectedListAttributes option:selected').last().index() < ($('#ProjectsSearchForm_selectedListAttributes option').length - 1))
                                {
                                    $($('#ProjectsSearchForm_selectedListAttributes option:selected').get().reverse()).each(function(i, selected)
                                    {
                                        if (!$(this).next().length) return false;
                                        $(this).insertAfter($(this).next());
                                    });
                                }
                            });

                $('#clear-search-link').removeAttr('clearForm');
                $('#clear-search-link').clearform({
                        form: '#search-form'
                    }
                );
                $('#clear-search-link').unbind('click.clear');
                $('#clear-search-link').bind('click.clear', function(){
                        $('#clearingSearch-search-form').val('1');
                        $('#clear-search-link').hide();
                        $(this).closest('form').find('.search-view-1').find('.dynamic-search-row').each(function()
                    {
                        $(this).remove();
                    });
                    $('#rowCounter-search-form').val(0);
                    $('#ProjectsSearchForm_dynamicStructure').val('');
                    $(this).closest('form').find('.search-view-1').hide();
                    $('.select-list-attributes-view').hide();
                    resolveClearLinkPrefixLabelAndVisibility('search-form');
                    rebuildDynamicSearchRowNumbersAndStructureInput('search-form');
            $('#savedSearchId').val();
                     $('#ProjectsSearchForm_savedSearchId').val('');
                     $('#save-search-area').hide();
                     jQuery.yii.submitForm(this, '', {}); return false;
            
                        $(this).closest('form').submit();
                        $('#clearingSearch-search-form').val('');
                        return false;
                    }
                );
                $('#more-search-link').unbind('click.more');
                $('#more-search-link').bind('click.more',  function(event){
                        $('.select-list-attributes-view').hide();
                        $('.kanban-board-options-view').hide();
                        $(this).closest('form').find('.search-view-1').toggle();
                        return false;
                    }
                );
                $('#cancel-advanced-search').unbind('click');
                $('#cancel-advanced-search').live('click', function(event){
                    $(this).closest('form').find('.search-view-1').hide();
                });
            
                $('#search-form').find('.anyMixedAttributes-input').unbind('input.clear propertychange.clear keyup.clear');
                $('#search-form').find('.anyMixedAttributes-input').bind('input.clear propertychange.clear keyup.clear', function(event)
                {
                    $('#clear-search-link').show();
                });
            $('#search-form').find('.anyMixedAttributes-input').unbind('input.clear propertychange.clear keyup.clear');
                     $('#search-form').find('.anyMixedAttributes-input').bind('input.clear propertychange.clear keyup.clear', function(event)
                     {
                         resolveClearLinkPrefixLabelAndVisibility('search-form');
                     });$('#save-as-advanced-search').click( function()
                    {
                        $('#save-search-area').show();
                        return false;
                    }
                );

                $('#show-dynamic-search-structure-div-link-search-form').click( function()
                    {
                        $('#show-dynamic-search-structure-div-search-form').show();
                        $('#show-dynamic-search-structure-div-link-search-form').hide();
                        return false;
                    }
                );
$('#search-form').yiiactiveform({'validateOnSubmit':true,'validateOnChange':false,'beforeValidate':$(this).beforeValidateAction,'afterValidate':afterDynamicSearchValidateAjaxAction,'afterValidateAjax':'var inputId = \'savedSearchId\';\n                        if (data.id != undefined)\n                        {\n                            var existingSearchFound = false;\n                            $(\'#\' + inputId + \' > option\').each(function()\n                            {\n                               if (this.value == data.id)\n                               {\n                                   $(\'#\' + inputId + \' option[value=\\\'\' + this.value + \'\\\']\').text(data.name);\n                                   existingSearchFound = true;\n                               }\n                            });\n                            if (!existingSearchFound)\n                            {\n                                $(\'#\' + inputId).removeClass(\'ignore-style\');\n                                $(\'#\' + inputId)\n                                    .append($(\'<option><\/option>\')\n                                    .attr(\'value\', data.id)\n                                    .text(data.name))\n                                //$(\'#\' + inputId).val(data.id); Do not select new saved search since it is not sticky at this point.\n                                $(\'#ProjectsSearchForm_savedSearchId\').val(data.id);\n                            }\n                        }\n                        $(\'#search-form\').find(\'.attachLoadingTarget\').removeClass(\'loading\');\n                        $(\'#search-form\').find(\'.attachLoadingTarget\').removeClass(\'loading-ajax-submit\');\n                        $(\'#search-form\').find(\'.attachLoadingTarget\').removeClass(\'attachLoadingTarget\');$(this).closest(\'form\').find(\'.search-view-1\').hide();\n                        $(\'.select-list-attributes-view\').hide();\n                        $(\'#search-form\').find(\'.attachLoading:first\').removeClass(\'loading\');\n                        $(\'#search-form\').find(\'.attachLoading:first\').removeClass(\'loading-ajax-submit\');\n                        $(\'#list-view-selectedIds\').val(null);\n                        $.fn.yiiGridView.update(\'list-view\',\n                        {\n                            data: \'Project_page=&Project_sort=\' // Not Coding Standard\n                         }\n                        );\n                        $(\'#clearingSearch-search-form\').val(\'\');\n                        ','attributes':[{'id':'ProjectsSearchForm_anyMixedAttributes','inputID':'ProjectsSearchForm_anyMixedAttributes','errorID':'ProjectsSearchForm_anyMixedAttributes_em_','model':'ProjectsSearchForm','name':'anyMixedAttributes','enableAjaxValidation':true},{'id':'ProjectsSearchForm_dynamicClauses','inputID':'ProjectsSearchForm_dynamicClauses','errorID':'ProjectsSearchForm_dynamicClauses','model':'ProjectsSearchForm','name':'dynamicClauses','enableAjaxValidation':true},{'id':'ProjectsSearchForm_savedSearchName','inputID':'ProjectsSearchForm_savedSearchName','errorID':'ProjectsSearchForm_savedSearchName_em_','model':'ProjectsSearchForm','name':'savedSearchName','enableAjaxValidation':true},{'id':'ProjectsSearchForm_dynamicStructure','inputID':'ProjectsSearchForm_dynamicStructure','errorID':'ProjectsSearchForm_dynamicStructure_em_','model':'ProjectsSearchForm','name':'dynamicStructure','enableAjaxValidation':true},{'id':'ProjectsSearchForm','inputID':'ProjectsSearchForm_','errorID':'ProjectsSearchForm__em_','model':'ProjectsSearchForm','name':null,'enableAjaxValidation':true}],'summaryID':'search-form_es_'});
jQuery('#list-view-rowSelector_all').live('click', function()
{
    var checked = this.checked;

    //custom checkbox style
    if (this.checked){
        jQuery(this).parent().addClass('c_on');
    }
    else
    {
        jQuery(this).parent().removeClass('c_on');
    }

    jQuery("input[name='list-view-rowSelector\[\]']").each(function()
    {
        this.checked = checked;
        updateListViewSelectedIds('list-view', $(this).val(), checked);

        //custom checkbox style
        if (this.checked){
            jQuery(this).parent().addClass('c_on');
        }
        else
        {
            jQuery(this).parent().removeClass('c_on');
        }
    });
});
jQuery("input[name='list-view-rowSelector\[\]']").live('click', function()
{
    jQuery('#list-view-rowSelector_all').attr( 'checked', jQuery("input[name='list-view-rowSelector\[\]']").length == jQuery("input[name='list-view-rowSelector\[\]']:checked").length);
    updateListViewSelectedIds('list-view', $(this).val(), $(this).attr('checked'));

    //custom checkbox style
    if ( jQuery('#list-view-rowSelector_all').attr( 'checked') === 'checked' ){
        jQuery('#list-view-rowSelector_all').parent().addClass('c_on');
    }
    else
    {
        jQuery('#list-view-rowSelector_all').parent().removeClass('c_on');
    }
    if ( this.checked )
    {
        jQuery(this).parent().addClass('c_on');
    }
    else
    {
        jQuery(this).parent().removeClass('c_on');
    }
});
jQuery('#list-view').yiiGridView({'ajaxUpdate':['list-view'],'ajaxVar':'ajax','pagerClass':'pager vertical','loadingClass':'loading','filterClass':'filters','tableClass':'items','selectableRows':2,'enableHistory':false,'updateSelector':'{page}, {sort}','filterSelector':'{filter}','pageVar':'Project_page','beforeAjaxUpdate':function(id, options) { $(this).makeSmallLoadingSpinner(true, "#" + id); addListViewSelectedIdsToUrl(id, options); },'afterAjaxUpdate':function(id, data) {
                        processAjaxSuccessError(id, data);
                        var $data = $(data);
                        jQuery.globalEval($data.filter("script").last().text());
                    }});

                processListViewSummaryClone("list-view", "summary", "list-view-summary-clone");
            

                $('#list-view-endless-page').unbind('click');
                $('#list-view-endless-page').bind('click', function(event)
                    {
                        $.fn.yiiGridView.update('list-view',
                        {
                            url: '/demos/stable/app/index.php/projects/default/list?Project_page=2',
                            type: 'GET',
                            success: function(data,status) {
                                var id = 'list-view';
                                var settings = $.fn.yiiGridView.settings[id];
                                $.each(settings.ajaxUpdate, function(i,v) {
                                    var id='#'+v;
                                    $(id).find('tbody:first').append($(id, data).find('tbody:first').html());
                                    $(id).find('.endless-list-pager').replaceWith($(id, data).find('.endless-list-pager'));
                                });
                                var $data = $(data);
                                jQuery.globalEval($data.filter('script').last().text());
                                if (settings.afterAjaxUpdate !== undefined)
                                    settings.afterAjaxUpdate(id, data);
                                $('#'+id).removeClass(settings.loadingClass);
                                //$.fn.yiiGridView.selectCheckedRows(id);
                            },
                        });
                        return false;
                    }
                );
});
/*]]>*/
</script>
<div class="performance-info">Load time: 0.324 seconds.<br /></div></body></html>
